package com.aynu.mypicture.Controller;

import com.aynu.bean.PictureDetail;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController//等于@ResponseBody+@Controller
public class myTestContrller {
    @Autowired
    PictureDetail pictureDetail;

    @RequestMapping("/MyHello")
    public String sayingCiaoLang() {
        System.out.println("运行了");
        return "扩展MVC";
    }

    @RequestMapping("/hello")
    public PictureDetail say() {
        System.out.println(pictureDetail);
        return pictureDetail;
    }
}
